home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_06 / dwyer / lehmer.mat < prev    next >
Text File  |  1995-02-10  |  236b  |  7 lines

  1. Listing 1
  2. (* rand.ma -- a couple of lines of Mathematica code
  3.         that execute a Lehmer generator
  4.    Print the 10,000th value after initializing at one *)
  5. Rand[x_]:=Mod[41358*x, 2147483647]
  6. x=1; Do[ x=Rand[x], {i,10000}];Print[x];
  7.